package com.study.minio.dao.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.minio.dao.model.OpenEmptyCardOrder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OpenEmptyCardOrderMapper extends BaseMapper<OpenEmptyCardOrder> {


    @Select("select id,sys_order_id,transaction_id from tb_openemptycard_order where sys_order_id=#{sysOrderId} limit 1")
    OpenEmptyCardOrder getBySysOrderId(@Param("sysOrderId") String sysOrderId);


    @SqlParser(filter = true)
    @Insert("${paramSQL}")
    int executeInsert(@Param("paramSQL")String paramSQL);

    @SqlParser(filter = true)
    @Select("${paramSQL}")
    List<String> showColumns(@Param("paramSQL") String paramSQL);
}
